/**
 * WPT 全局对象的适配器
 * 在迁移的过程中, 有很多业务中使用到了 WPT
 * 为了更直观的管理 packages 的迁移过程, 产生此文件
 * 用于描述 WPT 全局方法与 packages 中的关联关系
 * export 的 API 等于 WPT.xxx
 *
 * 迁移到此文件内的方法, 兼容 faceRunner 以及 普通渲染模式
 */

export { clearCookie, getCookie, getCookies, removeCookie, setCookie } from '@packages/lib-cookie';
export { hideOptionMenu, setRefer, showOptionMenu, wptCloseBtnHandel, wxConfigInit } from '@packages/lib-device';
export { execWxJob } from '@packages/lib-exec';
export { historyRouter, historyUrl, historyCache } from '@packages/lib-history';
export { default as Modal } from '@packages/lib-modal';
export { default as os } from '@packages/lib-os';

export { matchByHref, matchByPathname, matchScopeLimit } from '@packages/lib-router';
export {
    preloadPage,
    showPage,
    showPageInWeb,
    showPageNoAnimation,
    showPageNoRecord,
    historyBackFromCurrent,
} from '@packages/lib-router';

export { default as Storage, localStorage, sessionStorage } from '@packages/lib-storage';

import { handleUrl } from '@packages/lib-url';

// 兼容 WPT.handelUrl （错别字）
export const handelUrl = handleUrl;

export { loadScript } from '@packages/lib-window';
import { get, post } from '@packages/lib-request';

export { clearPage } from '@packages/face-runner';

export { getHtmlInfoFromComponent, setTitle, initHtml } from '@shared/document';

export const getData = get;
export const postData = post;
